<template>
  <div>
      <ul>
          <li @click="click('吃饭')">吃饭</li>
          <li @click="click('睡觉')">睡觉</li>
          <li @click="click('学Vue')">学Vue</li>
      </ul>
      <p>自定义事件:</p>
     
        <input type="text" name="textinput" id="textinput" placeholder="输入你要做的事情">
      
      <button type="submit" @click="submit">确定</button>
 </div>
</template>

<script>
export default {
  name: 'homeChose',
//   data(){
//       return{
//           thing:''
//       }
//   },
  methods:{
      click(thing){
          this.$router.push('/home/shown/'+thing)
      },
      submit(){
          let thing=document.getElementById("textinput").value
          this.$router.push('/home/shown/'+thing)
      }
    
  }
}

</script>
<style scoped>
li{
    list-style: none;
}
</style>
